﻿#region Using

using System.Windows;
using System.Windows.Controls;
using Database.POCO;
using Interfaces.Enums;
using System;

#endregion

namespace Controls.Selectors
{
    public class NotificationsDataTemplateSelector : DataTemplateSelector
    {
        #region properties

        private DataTemplate _appelNotification;
        public DataTemplate AppelNotification
        {
            get { return _appelNotification; }
            set
            {
                _appelNotification = value;
            }
        }

        private DataTemplate _etudeNotification;
        public DataTemplate EtudeNotification
        {
            get { return _etudeNotification; }
            set
            {
                _etudeNotification = value;
            }
        }

        private DataTemplate _defaultNotification;
        public DataTemplate DefaultNotification
        {
            get { return _defaultNotification; }
            set
            {
                _defaultNotification = value;
            }
        }

        #endregion

        /// <summary>
        /// Permet de définir les templates à sélectionner suivant les modules
        /// </summary>
        /// <param name="item"></param>
        /// <param name="container"></param>
        /// <returns></returns>
        /// <remarks>
        /// TODO : Ajoutez vos propres templates suivant vos modules
        /// </remarks>
        /// <example>
        /// if (item != null)
        ///    {
        ///        switch (((SysNotificationUser)item).Module)
        ///        {
        ///            case (int)TypeModulesEnum.Appels:
        ///                return AppelNotification;
        ///
        ///            default:
        ///                return DefaultNotification;
        ///        }
        ///    }
        /// </example>
        public override DataTemplate SelectTemplate(object item, DependencyObject container)
        {
            throw new NotImplementedException();
        }
    }
}
